<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="../common/jspcommon.jsp"%>
<%@include file="../common/jscss.jsp"%>
<%@include file="../common/selfCss.jsp"%>
<script type="text/javascript" src="/thirdparty/My97DatePicker/WdatePicker.js"></script>

<script language="javascript">
<!--

	var grid_ae = null;
	$(function(){
		
		grid_ae = $("#syslog_list").ligerGrid({
	            columns: [
	            { display: '日志id', name: 'id', isSort : false, width: 100 },
	            { display: '用户名', name: 'username',isSort : false, width: 200 },
	            { display: '真实姓名', name: 'realname',isSort : false, width: 200 },
	            { display: '操作类型', name: 'actionType',isSort : false, width: 200 },
	            { display: '操作对象', name: 'actionObject',isSort : false, width: 200, 
	            	render: function(record, rowindex, value, column){
	                	 return value + "("+record.tblId+")";
	                  }
	            },
	            { display: '操作时间', name: 'gmtCreated',isSort : false,
	                  render: function(record, rowindex, value, column){
	                	 return (new Date(value.time)).format("yyyy年MM月dd日 hh:mm:ss");
	                  }}
	            ], 
	            pageSize:10,
	            root :'list',
	            record:'totalRecord',
	            url: "/misc/info/getSyslog.htm", 
	            width: '99%',height:'99%'
	        });
	
	});
	 
	//条件查询
	function getSyslogsByCondition(){
		var actionType = $("#action_type").val();
		var startTime = $("#startTime").val();
		var endTime = $("#endTime").val();
		grid_ae.options.parms = [{name:'actionType',value:actionType},{name:'startTime',value:startTime},{name:'endTime',value:endTime}];
		grid_ae.loadData();
	}
//-->
</script>
<table class="def_t">
	<tr>
		<td>操作类型</td>
		<td>
			<select id="action_type">
				<option value="">全部</option>
				<option value="增加">增加</option>
				<option value="删除">删除</option>
				<option value="修改">修改</option>
				<option value="查询">查询</option>
			</select>
		</td>
		<td>时间范围</td>
		<td><input type="text" id="startTime" onclick="WdatePicker({el:'startTime',dateFmt:'yyyy-MM-dd HH:mm:ss',readOnly:true});" style="width: 180px;"></td>
		<td>至<input type="text" id="endTime" onclick="WdatePicker({el:'endTime',dateFmt:'yyyy-MM-dd HH:mm:ss',readOnly:true});" style="width: 180px;"></td>
		<td><button onclick="getSyslogsByCondition()">查询</button></td>
	</tr>
</table>
<div id="syslog_list" style="margin:0; padding:0"></div>

